package Clases;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
public class Song implements Serializable {
    String title;
    Float duration;
    Soundtrack soundtrack;
    Artista artista;

    public Song() {
    }

    public Song(String title, Float duration, Soundtrack soundtrack) {
        this.title = title;
        this.duration = duration;
        this.soundtrack = soundtrack;
    }

    public Float getDuration() {
        return duration;
    }

    public void setDuration(Float duration) {
        this.duration = duration;
    }

    public Soundtrack getSoundtrack() {
        return soundtrack;
    }

    public void setSoundtrack(Soundtrack soundtrack) {
        this.soundtrack = soundtrack;
    }
    
    @Id
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @ManyToOne
    @JoinColumn(name = "artista_id")
    public Artista getArtista() {
        return this.artista;
    }


}
